package quoc.phu;

import android.os.Bundle;
import android.app.Activity;
import android.app.LocalActivityManager;
import android.content.Intent;
import android.content.res.Resources;
import android.view.Menu;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;

public class od_MainActivity extends Activity {
	LocalActivityManager localActivity;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.od_activity_main);
		TabHost tabHost = (TabHost) findViewById(android.R.id.tabhost);
		Resources res = getResources();
		localActivity = new LocalActivityManager(this, false);
		TabHost.TabSpec spSubject, spContact; 
		Intent iContact, iSubject;

		localActivity.dispatchCreate(savedInstanceState);
		tabHost.setup(localActivity);

		iContact = new Intent().setClass(this, od_ContactActivity.class);
		iSubject = new Intent().setClass(this, od_SubjectActivity.class);
		spContact = tabHost.newTabSpec("contact").setIndicator("Danh sách liên lạc", res.getDrawable(R.drawable.ic_launcher))
				.setContent(iContact);

		spSubject = tabHost.newTabSpec("subject").setIndicator("Danh sách chủ đề", res.getDrawable(R.drawable.ic_action_search))
				.setContent(iSubject);
		tabHost.addTab(spContact);
		tabHost.addTab(spSubject);
		
		
	}

}
